var userName = 'user' + Math.floor((Math.random() * 1000) + 1);
var socket =  io.connect('http://localhost:9527');
socket.on('connect', function() {
			alert('<span class="connect-msg">Client has connected to the server!</span>');
});
socket.on('chatevent', function(data) {
	alert('<span class="username-msg">' + data.userName + ':</span> ' + data.message);
});
socket.on('disconnect', function() {
	alert('<span class="disconnect-msg">The client has disconnected!</span>');
});
 var jsonObject = {username: userName,
				  rank:'111',
				  roomId:'2222'};
  socket.emit('joinRoom', jsonObject);
  var jsonObject = {
			userName: '322323',
			msgContent: '343443'
		};
		socket.emit('message', jsonObject);